package com.settlement.system.service.impl;

import com.settlement.system.mapper.TblWcXcxCapitalBillMapper;
import com.settlement.system.common.exception.ServiceException;
import com.settlement.system.model.entity.common.TblWcXcxCapitalBill;
import com.settlement.system.service.ITblWcXcxCapitalBillService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import com.settlement.system.mapper.BaseMapper;
import jakarta.annotation.Resource;
import java.util.Map;

/**
 * 微信小程序-资金账单 服务实现类
 * @author Ximi
 * @since 2020-06-16
 */
@Service
@Slf4j
public class TblWcXcxCapitalBillServiceImpl extends BaseServiceImpl implements ITblWcXcxCapitalBillService {

    @Resource
    private TblWcXcxCapitalBillMapper tblWcXcxCapitalBillMapper;

    @Override
    public BaseMapper init() {
        return tblWcXcxCapitalBillMapper;
    }

    @Override
    public TblWcXcxCapitalBill getFoot(Map<String, Object> params) throws ServiceException {
        try {
            return tblWcXcxCapitalBillMapper.getFoot(params);
        } catch (Exception ex){
            log.error("获取合计异常",ex);
            throw new ServiceException("获取合计异常",ex);
        }
    }
}

